<?php

session_start();
if(!array_key_exists("user", $_SESSION) || $_SESSION['account'] != 1){
	header("Location: ../common/redirect.php");
	exit;
}

include_once("../class/db.php");
$db = new db();

if(array_key_exists("name", $_POST)){
	if($_POST['country'] == "0"){
	$sql = "UPDATE users SET fname = '{$_POST['name']}', lname = '{$_POST['lname']}', email = '{$_POST['email']}', alternate = '{$_POST['alternate']}', paypal = '{$_POST['paypal']}', profile_description = '{$_POST['profile_description']}' WHERE username = {$_SESSION['user']}";
	} else {
		$sql = "UPDATE users SET fname = '{$_POST['name']}', lname = '{$_POST['lname']}', email = '{$_POST['email']}', alternate = '{$_POST['alternate']}', paypal = '{$_POST['paypal']}', country = '{$_POST['country']}', profile_description = '{$_POST['profile_description']}' WHERE username = {$_SESSION['user']}";
	}
	$db->execute($sql, "none");
	$message = "Your Personal Information has been updated correctly";
}

if(array_key_exists("profile_type", $_POST)){
	$sql = "UPDATE users SET contact_information_type = '{$_POST['profile_type']}', address = '{$_POST['address']}', address2 = '{$_POST['address2']}', city = '{$_POST['city']}', state = '{$_POST['state']}', phone_home = '{$_POST['phone_home']}', phone_work = '{$_POST['phone_work']}', phone_mobil = '{$_POST['phone_mobil']}', msn = '{$_POST['msn']}', yahoo = '{$_POST['yahoo']}', facebook = '{$_POST['facebook']}', twitter = '{$_POST['twitter']}', google = '{$_POST['google']}' WHERE username = {$_SESSION['user']}";
	$db->execute($sql, "none");
	$message = "Your Contact Information has been updated correctly";
}

if(array_key_exists("change", $_POST)){
	if($_POST['change'] == "yes" && $_POST['newpassword'] == $_POST['newpassword2']){
		$sql = "SELECT username FROM users WHERE username = {$_SESSION['user']} AND password = '".sha1($_POST['password'])."'";
		$exists = $db->execute($sql, "none");
		if($exists == true){
			$sql = "UPDATE users SET password = '".sha1($_POST['password'])."', secure_question = '{$_POST['security_question']}', secure_answer = '{$_POST['security_answer']}' WHERE username = {$_SESSION['user']}";
			$db->execute($sql, "none");
		} else {
			$message = "Your password is not correct, please try again";
		}
	} else {
		$sql = "UPDATE users SET secure_question = '{$_POST['security_question']}', secure_answer = '{$_POST['security_answer']}' WHERE username = {$_SESSION['user']}";
			$db->execute($sql, "none");
			$message = "Your Login Information has been updated correctly";
	}
}

$sql = "SELECT * from users WHERE username = {$_SESSION['user']}";
$personal = $db->execute($sql, "onerow");

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PIE EDUCATION | Tools</title>
<link rel="stylesheet" type="text/css" href="/css/style-student.css" />
<link href="/css/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script type="text/javascript" src="/js/index.js"></script>
<script language="Javascript1.2">
<!--
setTimeout('location.href="/logout.php?expire=1"',600000);
// -->
</script>
<script>
$(document).ready(function() {
	$("#accordion").accordion({ autoHeight: false });
});
</script>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-35230372-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>

<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#000000"><table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="350" height="30">&nbsp;</td>
        <td align="right" valign="bottom"><a href="class.php" class="top-menu" style="color:#999">MY COURSES</a> <a href="schedule.php" class="top-menu" style="color:#999">CALENDAR</a> <a href="homework.php" class="top-menu" style="color:#999">HOMEWORK</a> <a href="test.php" class="top-menu" style="color:#999">EXAMS</a>  <a href="history.php" class="top-menu" style="color:#999">RECORDS</a> <a href="tools.php" class="top-menu" style="color:#999">TOOLS</a> <a href="/logout.php" class="top-menu" style="color:#999">SIGN OUT</a></td>
      </tr>
	  <tr>
        <td>&nbsp;</td>
        <td align="right" valign="bottom"><a href="/profile/" class="login-menu" style="color:#FFF"><?php echo $_SESSION['name'].' '.$_SESSION['lname']; ?></a> <a href="/common/settings.php" class="login-menu" style="color:#FFF">Change Settings</a> <a href="/common/redirect.php" class="login-menu" style="color:#FFF">My Documents</a> <a href="/network/" class="login-menu" style="color:#FFF">My Network</a></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="30" style="background-image:url(/images/top-bg-student.png); background-repeat:repeat-x">&nbsp;</td>
  </tr>
  <tr>
    <td height="550" valign="top"><table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>
        <div id="accordion">
            <h3><a href="#">Personal Information</a></h3>
            <div>
              <form id="personal" name="personal" method="post" action="tools.php">
                <table width="100%" border="0" cellspacing="4" cellpadding="4">
                  <tr>
                    <td width="150" align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Name</strong></td>
                    <td><input name="name" type="text" class="form-course" id="name" value="<?php echo $personal['fname'] ?>" /></td>
                  </tr>
                  <tr>
                    <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Last Name</strong></td>
                    <td><input name="lname" type="text" class="form-course" id="lname" value="<?php echo $personal['lname'] ?>" /></td>
                  </tr>
                  <tr>
                    <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>E-Mail</strong></td>
                    <td><input name="email" type="text" class="form-course" id="email" value="<?php echo $personal['email'] ?>" /></td>
                  </tr>
                  <tr>
                    <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Alternate E-Mail</strong></td>
                    <td><input name="alternate" type="text" class="form-course" id="alternate" value="<?php echo $personal['alternate'] ?>" /></td>
                  </tr>
                  <tr>
                    <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Paypal Address</strong></td>
                    <td><input name="paypal" type="text" class="form-course" id="paypal" value="<?php echo $personal['paypal'] ?>" /></td>
                  </tr>
                  <tr>
                    <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Country</strong></td>
                    <td><select name="country" class="form-course" id="country">
                      <option value="0" selected="selected">I don't want to change my country</option>
    <option value="00">none</option>
    <option value="AF">Afghanistan</option>
    <option value="AL">Albania</option>
    <option value="DZ">Algeria</option>
    <option value="AS">American Samoa</option>
    <option value="AD">Andorra</option>
    <option value="AO">Angola</option>
    <option value="AI">Anguilla</option>
    <option value="AQ">Antarctica</option>
    <option value="AG">Antigua and Barbuda</option>
    <option value="AR">Argentina</option>
    <option value="AM">Armenia</option>
    <option value="AW">Aruba</option>
    <option value="AU">Australia</option>
    <option value="AT">Austria</option>
    <option value="AZ">Azerbaijan</option>
    <option value="BS">Bahamas</option>
    <option value="BH">Bahrain</option>
    <option value="BD">Bangladesh</option>
    <option value="BB">Barbados</option>
    <option value="BY">Belarus</option>
    <option value="BE">Belgium</option>
    <option value="BZ">Belize</option>
    <option value="BJ">Benin</option>
    <option value="BM">Bermuda</option>
    <option value="BT">Bhutan</option>
    <option value="BO">Bolivia</option>
    <option value="BA">Bosnia and Herzegowina</option>
    <option value="BW">Botswana</option>
    <option value="BV">Bouvet Island</option>
    <option value="BR">Brazil</option>
    <option value="IO">British Indian Ocean Territory</option>
    <option value="BN">Brunei Darussalam</option>
    <option value="BG">Bulgaria</option>
    <option value="BF">Burkina Faso</option>
    <option value="BI">Burundi</option>
    <option value="KH">Cambodia</option>
    <option value="CM">Cameroon</option>
    <option value="CA">Canada</option>
    <option value="CV">Cape Verde</option>
    <option value="KY">Cayman Islands</option>
    <option value="CF">Central African Republic</option>
    <option value="TD">Chad</option>
    <option value="CL">Chile</option>
    <option value="CN">China</option>
    <option value="CX">Christmas Island</option>
    <option value="CC">Cocos (Keeling) Islands</option>
    <option value="CO">Colombia</option>
    <option value="KM">Comoros</option>
    <option value="CG">Congo</option>
    <option value="CD">Congo, the Democratic Republic of the</option>
    <option value="CK">Cook Islands</option>
    <option value="CR">Costa Rica</option>
    <option value="CI">Cote d'Ivoire</option>
    <option value="HR">Croatia (Hrvatska)</option>
    <option value="CU">Cuba</option>
    <option value="CY">Cyprus</option>
    <option value="CZ">Czech Republic</option>
    <option value="DK">Denmark</option>
    <option value="DJ">Djibouti</option>
    <option value="DM">Dominica</option>
    <option value="DO">Dominican Republic</option>
    <option value="TP">East Timor</option>
    <option value="EC">Ecuador</option>
    <option value="EG">Egypt</option>
    <option value="SV">El Salvador</option>
    <option value="GQ">Equatorial Guinea</option>
    <option value="ER">Eritrea</option>
    <option value="EE">Estonia</option>
    <option value="ET">Ethiopia</option>
    <option value="FK">Falkland Islands (Malvinas)</option>
    <option value="FO">Faroe Islands</option>
    <option value="FJ">Fiji</option>
    <option value="FI">Finland</option>
    <option value="FR">France</option>
    <option value="FX">France, Metropolitan</option>
    <option value="GF">French Guiana</option>
    <option value="PF">French Polynesia</option>
    <option value="TF">French Southern Territories</option>
    <option value="GA">Gabon</option>
    <option value="GM">Gambia</option>
    <option value="GE">Georgia</option>
    <option value="DE">Germany</option>
    <option value="GH">Ghana</option>
    <option value="GI">Gibraltar</option>
    <option value="GR">Greece</option>
    <option value="GL">Greenland</option>
    <option value="GD">Grenada</option>
    <option value="GP">Guadeloupe</option>
    <option value="GU">Guam</option>
    <option value="GT">Guatemala</option>
    <option value="GN">Guinea</option>
    <option value="GW">Guinea-Bissau</option>
    <option value="GY">Guyana</option>
    <option value="HT">Haiti</option>
    <option value="HM">Heard and Mc Donald Islands</option>
    <option value="VA">Holy See (Vatican City State)</option>
    <option value="HN">Honduras</option>
    <option value="HK">Hong Kong</option>
    <option value="HU">Hungary</option>
    <option value="IS">Iceland</option>
    <option value="IN">India</option>
    <option value="ID">Indonesia</option>
    <option value="IR">Iran (Islamic Republic of)</option>
    <option value="IQ">Iraq</option>
    <option value="IE">Ireland</option>
    <option value="IL">Israel</option>
    <option value="IT">Italy</option>
    <option value="JM">Jamaica</option>
    <option value="JP">Japan</option>
    <option value="JO">Jordan</option>
    <option value="KZ">Kazakhstan</option>
    <option value="KE">Kenya</option>
    <option value="KI">Kiribati</option>
    <option value="KP">Korea, Democratic People's Republic of</option>
    <option value="KR">Korea, Republic of</option>
    <option value="KW">Kuwait</option>
    <option value="KG">Kyrgyzstan</option>
    <option value="LA">Lao People's Democratic Republic</option>
    <option value="LV">Latvia</option>
    <option value="LB">Lebanon</option>
    <option value="LS">Lesotho</option>
    <option value="LR">Liberia</option>
    <option value="LY">Libyan Arab Jamahiriya</option>
    <option value="LI">Liechtenstein</option>
    <option value="LT">Lithuania</option>
    <option value="LU">Luxembourg</option>
    <option value="MO">Macau</option>
    <option value="MK">Macedonia, The Former Yugoslav Republic of</option>
    <option value="MG">Madagascar</option>
    <option value="MW">Malawi</option>
    <option value="MY">Malaysia</option>
    <option value="MV">Maldives</option>
    <option value="ML">Mali</option>
    <option value="MT">Malta</option>
    <option value="MH">Marshall Islands</option>
    <option value="MQ">Martinique</option>
    <option value="MR">Mauritania</option>
    <option value="MU">Mauritius</option>
    <option value="YT">Mayotte</option>
    <option value="MX">Mexico</option>
    <option value="FM">Micronesia, Federated States of</option>
    <option value="MD">Moldova, Republic of</option>
    <option value="MC">Monaco</option>
    <option value="MN">Mongolia</option>
    <option value="MS">Montserrat</option>
    <option value="MA">Morocco</option>
    <option value="MZ">Mozambique</option>
    <option value="MM">Myanmar</option>
    <option value="NA">Namibia</option>
    <option value="NR">Nauru</option>
    <option value="NP">Nepal</option>
    <option value="NL">Netherlands</option>
    <option value="AN">Netherlands Antilles</option>
    <option value="NC">New Caledonia</option>
    <option value="NZ">New Zealand</option>
    <option value="NI">Nicaragua</option>
    <option value="NE">Niger</option>
    <option value="NG">Nigeria</option>
    <option value="NU">Niue</option>
    <option value="NF">Norfolk Island</option>
    <option value="MP">Northern Mariana Islands</option>
    <option value="NO">Norway</option>
    <option value="OM">Oman</option>
    <option value="PK">Pakistan</option>
    <option value="PW">Palau</option>
    <option value="PA">Panama</option>
    <option value="PG">Papua New Guinea</option>
    <option value="PY">Paraguay</option>
    <option value="PE">Peru</option>
    <option value="PH">Philippines</option>
    <option value="PN">Pitcairn</option>
    <option value="PL">Poland</option>
    <option value="PT">Portugal</option>
    <option value="PR">Puerto Rico</option>
    <option value="QA">Qatar</option>
    <option value="RE">Reunion</option>
    <option value="RO">Romania</option>
    <option value="RU">Russian Federation</option>
    <option value="RW">Rwanda</option>
    <option value="KN">Saint Kitts and Nevis</option> 
    <option value="LC">Saint LUCIA</option>
    <option value="VC">Saint Vincent and the Grenadines</option>
    <option value="WS">Samoa</option>
    <option value="SM">San Marino</option>
    <option value="ST">Sao Tome and Principe</option> 
    <option value="SA">Saudi Arabia</option>
    <option value="SN">Senegal</option>
    <option value="SC">Seychelles</option>
    <option value="SL">Sierra Leone</option>
    <option value="SG">Singapore</option>
    <option value="SK">Slovakia (Slovak Republic)</option>
    <option value="SI">Slovenia</option>
    <option value="SB">Solomon Islands</option>
    <option value="SO">Somalia</option>
    <option value="ZA">South Africa</option>
    <option value="GS">South Georgia and the South Sandwich Islands</option>
    <option value="ES">Spain</option>
    <option value="LK">Sri Lanka</option>
    <option value="SH">St. Helena</option>
    <option value="PM">St. Pierre and Miquelon</option>
    <option value="SD">Sudan</option>
    <option value="SR">Suriname</option>
    <option value="SJ">Svalbard and Jan Mayen Islands</option>
    <option value="SZ">Swaziland</option>
    <option value="SE">Sweden</option>
    <option value="CH">Switzerland</option>
    <option value="SY">Syrian Arab Republic</option>
    <option value="TW">Taiwan, Province of China</option>
    <option value="TJ">Tajikistan</option>
    <option value="TZ">Tanzania, United Republic of</option>
    <option value="TH">Thailand</option>
    <option value="TG">Togo</option>
    <option value="TK">Tokelau</option>
    <option value="TO">Tonga</option>
    <option value="TT">Trinidad and Tobago</option>
    <option value="TN">Tunisia</option>
    <option value="TR">Turkey</option>
    <option value="TM">Turkmenistan</option>
    <option value="TC">Turks and Caicos Islands</option>
    <option value="TV">Tuvalu</option>
    <option value="UG">Uganda</option>
    <option value="UA">Ukraine</option>
    <option value="AE">United Arab Emirates</option>
    <option value="GB">United Kingdom</option>
    <option value="US">United States</option>
    <option value="UM">United States Minor Outlying Islands</option>
    <option value="UY">Uruguay</option>
    <option value="UZ">Uzbekistan</option>
    <option value="VU">Vanuatu</option>
    <option value="VE">Venezuela</option>
    <option value="VN">Viet Nam</option>
    <option value="VG">Virgin Islands (British)</option>
    <option value="VI">Virgin Islands (U.S.)</option>
    <option value="WF">Wallis and Futuna Islands</option>
    <option value="EH">Western Sahara</option>
    <option value="YE">Yemen</option>
    <option value="YU">Yugoslavia</option>
    <option value="ZM">Zambia</option>
    <option value="ZW">Zimbabwe</option>
</select></td>
                  </tr>
                  <tr>
                    <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Profile Description</strong></td>
                    <td><textarea name="profile_description" cols="45" rows="5" class="form-course" id="profile_description"><?php echo $personal['profile_description'] ?></textarea></td>
                  </tr>
                  <tr>
                    <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px">&nbsp;</td>
                    <td><input name="button" type="submit" class="submit" id="button" value="Save Personal Information" /></td>
                  </tr>
                </table>
              </form>
            </div>
            <h3><a href="#">Contact Information</a></h3>
            <div>
                <form id="contact" name="contact" method="post" action="tools.php">
                  <table width="100%" border="0" align="center" cellpadding="4" cellspacing="4">
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px" width="150"><strong>Profile Type</strong></td>
                      <td><select name="profile_type" class="form-course" id="profile_type">
                        <option value="public" selected="selected">Public</option>
                        <option value="private">Private</option>
                      </select></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Address</strong></td>
                      <td><input name="address" type="text" class="form-course" id="address" value="<?php echo $personal['address'] ?>" /></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Address 2</strong></td>
                      <td><input name="address2" type="text" class="form-course" id="address2" value="<?php echo $personal['address2'] ?>" /></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>City</strong></td>
                      <td><input name="city" type="text" class="form-course" id="city" value="<?php echo $personal['city'] ?>" /></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>State</strong></td>
                      <td><input name="state" type="text" class="form-course" id="state" value="<?php echo $personal['state'] ?>" /></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Phone Home</strong></td>
                      <td><input name="phone_home" type="text" class="form-course" id="phone_home" value="<?php echo $personal['phone_home'] ?>" /></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Phone Work</strong></td>
                      <td><input name="phone_work" type="text" class="form-course" id="phone_work" value="<?php echo $personal['phone_work'] ?>" /></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Mobil</strong></td>
                      <td><input name="phone_mobil" type="text" class="form-course" id="phone_mobil" value="<?php echo $personal['phone_mobil'] ?>" /></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>MSN</strong></td>
                      <td><input name="msn" type="text" class="form-course" id="msn" value="<?php echo $personal['msn'] ?>" /></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Yahoo</strong></td>
                      <td><input name="yahoo" type="text" class="form-course" id="yahoo" value="<?php echo $personal['yahoo'] ?>" /></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Facebook</strong></td>
                      <td><input name="facebook" type="text" class="form-course" id="facebook" value="<?php echo $personal['facebook'] ?>" /></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Twitter</strong></td>
                      <td><input name="twitter" type="text" class="form-course" id="twitter" value="<?php echo $personal['twitter'] ?>" /></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Google+</strong></td>
                      <td><input name="google" type="text" class="form-course" id="google" value="<?php echo $personal['google'] ?>" /></td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td><input name="button2" type="submit" class="submit" id="button2" value="Save Contact Information" /></td>
                    </tr>
                  </table>
                </form>
            </div>
            <h3><a href="#">Privacy Settings</a></h3>
            <div>
                <p>
                Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
                Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
                ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
                lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
                </p>
                <ul>
                    <li>List item one</li>
                    <li>List item two</li>
                    <li>List item three</li>
                </ul>
            </div>
            <h3><a href="#">Logging Settings</a></h3>
            <div>
                <form id="login" name="login" method="post" action="tools.php">
                  <table width="100%" border="0" align="center" cellpadding="4" cellspacing="4">
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Change Password?</strong></td>
                      <td><select name="change" class="form-course" id="change">
                        <option value="no" selected="selected">No</option>
                        <option value="yes">Yes</option>
                      </select></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px" width="150"><strong>Old Password</strong></td>
                      <td><input name="password" type="password" class="form-course" id="password" /></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>New Password</strong></td>
                      <td><input name="newpassword" type="password" class="form-course" id="newpassword" /></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Repeat New Password</strong></td>
                      <td><input name="newpassword2" type="password" class="form-course" id="newpassword2" /></td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td style="color:#00F; font-family:Arial, Helvetica, sans-serif; font-size:9px; font-style:italic">To change your password please provide your old password and type twice your new password</td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Security Question</strong></td>
                      <td><input name="security_question" type="text" class="form-course" id="security_question" value="<?php echo $personal['secure_question'] ?>" /></td>
                    </tr>
                    <tr>
                      <td align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Security Answer</strong></td>
                      <td><input name="security_answer" type="text" class="form-course" id="security_answer" value="<?php echo $personal['secure_answer'] ?>" /></td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td><input name="button3" type="submit" class="submit" id="button3" value="Save Login Information" /></td>
                    </tr>
                  </table>
                </form>
            </div>
        </div>
        </td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="30" align="center" style=" background-image:url(../images/bottom-bg-student.png); background-repeat:repeat-x;">&nbsp;</td>
  </tr>
  <tr>
    <td height="50" align="center" bgcolor="#000000" style="color:#fff; font-family:Arial, Helvetica, sans-serif">PIE.EDU All Rights Reserved 2012<br />
      <a href="/common/privacy.php" class="bottom-menu" style="color:#999">Privacy Policy</a> | <a href="/common/terms.php" class="bottom-menu"  style="color:#999">Terms of Use</a> | <a href="/help/main.php" class="bottom-menu" style="color:#999">Help Center</a> | <a href="/common/jobs.php" class="bottom-menu" style="color:#999">Jobs</a></td>
  </tr>
    </table>
<div id="dialog-form" title="Review The Exam">
    
</div>
</body>
</html>